//
//  UIColor+GMAdd.m
//  gentleman
//
//  Created by 范月成 on 2017/12/5.
//  Copyright © 2017年 fancy. All rights reserved.
//

#import "UIColor+GMAdd.h"
#import "CommonDefines.h"
#import <YYCategories/YYCategories.h>

@implementation UIColor (GMTheme)

+ (UIColor *)themeBlack {
    return UIColorHex(#333333);
}

+ (UIColor *)themePink {
    return UIColorHex(#F9749A);
}

+ (UIColor *)themeBlue {
    return UIColorHex(#00A8E9);
}

+ (UIColor *)themeGray {
    return UIColorHex(#999999);
}

+ (UIColor *)themeLightgory {
    return UIColorHex(#CCCCCC);
}

+ (UIColor *)color_category_doujinshi {
    return kColorRGB(0.957, 0.263, 0.212, 1);
}

+ (UIColor *)color_category_manga {
    return kColorRGB(1, 0.596, 0, 1);
}

+ (UIColor *)color_category_artistcg {
    return kColorRGB(0.984, 0.753, 0.176, 1);
}

+ (UIColor *)color_category_gamecg {
    return kColorRGB(0.298, 0.686, 0.314, 1);
}

+ (UIColor *)color_category_western {
    return kColorRGB(0.545, 0.765, 0.290, 1);
}

+ (UIColor *)color_category_nonh {
    return kColorRGB(0.129, 0.588, 0.953, 1);
}

+ (UIColor *)color_category_imageset {
    return kColorRGB(0.247, 0.318, 0.710, 1);
}

+ (UIColor *)color_category_cosplay {
    return kColorRGB(0.612, 0.153, 0.690, 1);
}

+ (UIColor *)color_category_asianporn {
    return kColorRGB(0.584, 0.459, 0.804, 1);
}

+ (UIColor *)color_category_misc {
    return kColorRGB(0.941, 0.384, 0.573, 1);
}

+ (UIColor *)colorWithCategory:(NSString *)category {
    if ([[category lowercaseString] containsString:@"doujinshi"]) {
        return [UIColor color_category_doujinshi];
    } else if ([[category lowercaseString] containsString:@"manga"]) {
        return [UIColor color_category_manga];
    } else if ([[category lowercaseString] containsString:@"artist cg"]) {
        return [UIColor color_category_artistcg];
    } else if ([[category lowercaseString] containsString:@"gamecg"]) {
        return [UIColor color_category_gamecg];
    } else if ([[category lowercaseString] containsString:@"western"]) {
        return [UIColor color_category_western];
    } else if ([[category lowercaseString] containsString:@"non-h"]) {
        return [UIColor color_category_nonh];
    } else if ([[category lowercaseString] containsString:@"imageset"]) {
        return [UIColor color_category_imageset];
    } else if ([[category lowercaseString] containsString:@"cosplay"]) {
        return [UIColor color_category_cosplay];
    } else if ([[category lowercaseString] containsString:@"asianporn"]) {
        return [UIColor color_category_asianporn];
    } else if ([[category lowercaseString] containsString:@"misc"]) {
        return [UIColor color_category_misc];
    } else {
        return [UIColor themePink];
    }
}

@end
